﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Store.Bll;
using Store.Model.Models;
using Microsoft.AspNetCore.Cors;

namespace Store.Server.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    [EnableCors("any")]
    public class OnePageController : ControllerBase
    {
        private onePageBLL bll;
        public OnePageController(onePageBLL _bll)
        {
            bll = _bll;
        }
        [HttpGet]
        public List<Order> GetOrders()
        {
            //++
            var data= bll.GetOrders();
            return data;
        }
    }
}
